Skip to content

feat(ui): two-icon sync-presence display (local + NAS) - #26

Merged
Xander-git merged 9 commits into
mainfrom
worktree-two-icon-sync-presence
May 31, 2026
Merged

feat(ui): two-icon sync-presence display (local + NAS)#26
Xander-git merged 9 commits into
mainfrom
worktree-two-icon-sync-presence

Conversation

@Xander-git

Copy link
Copy Markdown
Collaborator

Summary

Replaces the per-file sync display with a two-icon presence model so operators read only what matters: is a file here (local), on the NAS (backed up), both, or broken. The old single glyph encoded ten machine states; most describe sync machinery the operator never acts on.

Each file now shows a fixed local-left / NAS-right icon pair (sync_local.svg + sync_nas.svg); runs (left tree) and the folder metadata pane show a single colour-coded rollup icon. sync_cloud.svg is retired.

Colour language

blue = here · green = safe on NAS · gray = absent · red = problem · amber = held.

State local NAS
Local only (incl. in-progress) 🔵 blue ⬜ gray
Synced 🔵 faded blue (cache) 🟢 green
On NAS only (local cleaned) ⬜ gray 🟢 green
Upload failed 🔵 blue 🔴 red ✕
Held by validation 🔵 blue 🟠 amber !
Missing (lost everywhere) 🔴 red ✕ 🔴 red ✕

Folder/run rollup → one icon: synced→sync_nas green, not-synced→sync_local blue, held→amber, error→red.

How it works

  • Backend stays the state authority. browse.py emits a discriminator string per file; the UI (sync_status_icon.py) is a pure presentation map (file_sync_viewFileSyncView → icon/colour props).
  • Failure is per-run, read from the persisted creation.json sync_status, then propagated to that run's unverified on-disk files and the rollups. (The originally-specced "live queue" path was unusable: per-file failure isn't persisted and the queue accessor doesn't exist.)
  • Lost-file fix: unverified, locally-absent records were silently dropped from the listing — they now surface as missing (red/red).
  • Accessibility: fixed local/NAS position + distinct SVG shapes + worded tooltips, plus /! corner badges so red/amber aren't colour-only.

Scope

File rows (two icons) · run tree + folder metadata pane (single rollup icon). Out of scope: center-pane sub-folder rollups; the hidden orchestrator/staging surfaces; any sync-engine/queue/schema change.

Design & plan

  • Spec: docs/superpowers/specs/2026-05-30-two-icon-sync-presence-design.md

Testing

  • mypy src/exlab_wizard0 errors / 156 files
  • ruff check (src + tests) → clean; ruff format clean on all files this PR changes
  • tests/unit/ui635 passed; tests/unit/api -k browse36 passed (incl. 9 new discriminator tests); tests/unit/ui/test_theme.py → 17 passed
  • tests/integration131 passed
  • tests/e2e/test_flow_05_browse_view_sync_icons.py2 passed (ran live against Chromium)
  • Full tests/unit run showed 4 pre-existing flaky failures in tests/unit/sync/test_nas_client*.py — polling/timing assertions that flake under CPU load when the whole suite runs at once (documented project flakiness). These files are not touched by this PR and pass when the suite is run on its own.

Each task was reviewed by a code-review agent and a simplify agent before commit.

🤖 Generated with Claude Code

Collapses the 10-state single glyph into a 7-view presence model
(local + NAS icons per file; single rollup icon for folders/runs).
Pure mapping + props layer with NiceGUI renderers; badge dot matches
the cell's alert hue (red problem / amber held).
…m browse

Adds the lost-file fix (unverified-absent records now surface as
'missing' instead of being dropped) and propagates per-run failure
from creation.json to unverified on-disk files and the run rollup.
…e, metadata, legend

Replaces the single status glyph with the local+NAS pair in file rows,
a single colour-coded rollup icon in the run tree and folder metadata
pane (tree now uses sync_nas.svg; sync_cloud.svg retired). Legend renders
real swatches. Tree badge dot binds to sync_badge_bg (amber for held).
…ssertions

Seed runs covering each rollup state (syncing/cleared/upload_failed/blocked),
add missing/upload_failed/blocked file rows, page-object icon locators, and
rewrite flow_05 to assert the two-icon language.
@Xander-git
Xander-git force-pushed the worktree-two-icon-sync-presence branch from 3479757 to b74d736 Compare May 31, 2026 06:27
…on design

The seeded hierarchy gained the failed/blocked runs (so the tree rollup
states are covered), so a 'Demo' search now matches 6 nodes not 4. And
sync_legend_entries() now emits the FileSyncView vocabulary, so the
legend popover lists 'Fully backed up on the NAS' / 'Sync held by a
validation finding' instead of the old per-glyph wording.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Xander-git
Xander-git merged commit 82a052b into main May 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant